package com.greate.springbootmysqlreadwrite.mysqlreadwrite.util;

import java.util.Random;

public class NumberUtil {
	/**
	 * 从num中随机抽取i个值
	 *
	 * @return int
	 */
	public static int getRandom(int min, int max) {
		Random random = new Random();
		return random.nextInt(max) % (max - min + 1) + min;
	}

	public static void main(String[] args) {
		int random = getRandom(1, 1);
		System.out.println(random);
	}
}
